/*
 * @brief
 * @author li yong (DogLee)
 * @email 20162439@qq.com
 * @version 1.0
 * @date 2018-08-03 09:16:49
 */
#ifndef LOGMANAGER_H
#define LOGMANAGER_H

#include "ilogappender.h"

#include <QObject>
#include <QList>
#include <QElapsedTimer>

class LogManager : public QObject
{
    Q_OBJECT
public:
    static LogManager* instance();

    virtual ~LogManager();

    void appendMessage(const DebugMessage& message);

    void dump();

protected:
    LogManager();

    static LogManager* pInstance;
    QList<ILogAppender*> logAppenders;
};

#define logManager LogManager::instance()

#endif // LOGMANAGER_H
